﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleRest.Core
{
    /// <summary>
    /// The attribute used to indicate an operation should hand the POST http version.  This will tell the REST pipeline to route
    /// all POST http verbs with the matching route to the tagged operation.
    /// </summary>      
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
    public class WebPostAttribute : Attribute, IWebInvokeAttribute
    {
        public WebPostAttribute()
        {
            this.Method = "POST";
        }

        /// <summary>
        /// POST
        /// </summary>
        public string Method { get; private set; }
        /// <summary>
        /// The UriTemplate is the route associated to the operation that indicates what uri pattern that all incoming
        /// REST requests should be mapped to.
        /// </summary>
        public string UriTemplate { get; set; }
    }
}
